

public class Test {
    public static void main(String[] args) {
       String s1="name=zhangsan&age=10";
        String[] ret=s1.split("&");
        for (String s: ret) {
       String[] ret2=s.split("=");
            for (String ss: ret2) {
                System.out.println(ss);

            }

        }
    }
}
